package com.fowo.api.model.logistics.channel;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.fowo.api.common.validator.EnumsString;
import java.util.List;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/** 物流渠道 导入导出辅助模型 */
@Getter
@Setter
public class LogisticsChannelExcelPo {

  @NotBlank(message = "物流渠道不能为空")
  @Size(max = 50, message = "物流渠道长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*物流渠道")
  private String name;

  @ExcelProperty(value = "预计时效")
  private Integer expectAgeing;

  @Size(max = 50, message = "目的国家长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "目的国家")
  private String destinationCountryCountry;

  @ExcelIgnore
  @ExcelProperty(value = "目的国家")
  private List<Long> destinationCountry;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "提货地址")
  private String deliveryAddressName;

  @ExcelIgnore
  @ExcelProperty(value = "提货地址")
  private Long deliveryAddress;

  @EnumsString(
    value = { "是", "否" },
    message = "是否包税的可用值为 “是”, “否” 其中之一"
  )
  @Size(max = 50, message = "是否包税长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "是否包税")
  private String taxIncluded;

  @Size(max = 50, message = "备注长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "备注")
  private String remarks;

  @EnumsString(
    value = { "计费重(KG)", "实重(KG)", "体积(KG)" },
    message = "计费规则的可用值为 “计费重(KG)”, “实重(KG)”, “体积(KG)” 其中之一"
  )
  @Size(max = 50, message = "计费规则长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "计费规则")
  private String bllingRules;

  @EnumsString(
    value = { "是", "否" },
    message = "分抛计算的可用值为 “是”, “否” 其中之一"
  )
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "分抛计算")
  private String splitCalculation;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "计费规则")
  private String billingRules;

  @ExcelProperty(value = "基材参数")
  private Integer substrateParam;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "分抛计算")
  private String splitCalc;

  @ExcelProperty(value = "单票最小重量")
  private Integer ticketMinWeight;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "单票最小重量单位")
  private String ticketMinWeightUnit;
}
